package com.vhall.component.entity.account.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 管理后台-账户新增
 *
 * @author yongzheng.xu
 * @date 2021/4/24 21:25
 */
@Data
public class AdmAccountAddVO implements Serializable {

    private static final long serialVersionUID = -9306613697911255L;

    @ParamName("phone")
    @NotBlank(message = "phone不能为空")
    private String phone;

    @ParamName("username")
    @NotBlank(message = "username不能为空")
    private String username;

    @ParamName("nick_name")
    @NotBlank(message = "不能为空")
    private String nickname;

    @ParamName("sex")
    @Range(min = 0, max = 1, message = "sex只能是0,1")
    private Integer sex = 1;

    @ParamName("type")
    @Range(min = 1, max = 2, message = "type只能是1,2")
    private Integer type;
}
